#pragma once
#include "CBaseObject.h"
#include "../../Renderer/Header Files/CRenderer_AL.h"
#include "../../Renderer/Header Files/CCamera_AL.h"
#include <vector>
using namespace std;

class CObjectManager
{
private:
	CRenderer_AL*	m_pRenderer;
	vector<CBaseObject*>	m_vObjects;
	vector<CRenderNode_AL*>	m_pRenderNodes;
public:
	CObjectManager();
	~CObjectManager();
	static CObjectManager* GetInstance();
	void Initialize();
	void Shutdown();
	void Update(float fDT, cCamera_AL* camera = NULL);
	int AddItemToObjects(CBaseObject* _pObject) { m_vObjects.push_back(_pObject); return m_vObjects.size() - 1; }
	void RemoveObject(int _nID);
	void RemoveObject(CBaseObject*);
	void ClearAllObjects() { m_vObjects.clear(); }

	CBaseObject* GetBaseObject(int _nID);
};